<template>
  <div id="app">
    <Header />
    <router-view />
    <Footer v-show="$route.meta.show"/>
  </div>
</template>

<script>
import Footer from "@/components/content/footer/Footer.vue";
import Header from "@/components/content/header/Header.vue";

export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    // 派发一个action，获取商品分类的二三级列表数据，放在App.vue的mounted中只会调用一次，优化性能
    this.$store.dispatch("categoryList");
  },
};
</script>


<style lang='less' scoped>
</style>
